/**
 * This file is part of Idegen, the application to create IDE project files.
 *
 * @copyright Copyright (c) 2011-2012, Walter Tamboer http://waltertamboer.nl
 * @file Idegen/Idegen/IdegenGeneratorType.hpp
 */

#ifndef IDEGEN_IDEGEN_IDEGENGENERATORTYPE_HPP
#define IDEGEN_IDEGEN_IDEGENGENERATORTYPE_HPP

namespace Idegen
{
	/** An enumeration containing all generators that Idegen supports. */
	enum IdegenGeneratorType
	{
		/** An unknown generator. */
		IdegenGeneratorTypeUnknown,

		/** A Netbeans 7.0 generator. */
		IdegenGeneratorTypeNetbeans70,

		/** A Visual Studio 2005 generator. */
		IdegenGeneratorTypeVisualStudio2005,
		
		/** A Visual Studio 2008 generator. */
		IdegenGeneratorTypeVisualStudio2008,
		
		/** A Visual Studio 2010 generator. */
		IdegenGeneratorTypeVisualStudio2010,
	};

	/**
	 * Converts the given string to the generator type.
	 *
	 * @param[in] type The string to convert.
	 * @return Returns a IdegenGeneratorType value.
	 */
	inline IdegenGeneratorType StringToGeneratorType( const std::string& type )
	{
		IdegenGeneratorType result = IdegenGeneratorTypeUnknown;
		
		if ( type == "netbeans70" )
		{
			result = IdegenGeneratorTypeNetbeans70;
		}
		else if ( type == "vs2005" )
		{
			result = IdegenGeneratorTypeVisualStudio2005;
		}
		else if ( type == "vs2008" )
		{
			result = IdegenGeneratorTypeVisualStudio2008;
		}
		else if ( type == "vs2010" )
		{
			result = IdegenGeneratorTypeVisualStudio2010;
		}

		return result;
	}
}

#endif
